/*
 * @Author: chen haoxuan
 * @Date: 2021-05-04 20:59:20
 * @LastEditTime: 2021-05-05 15:41:02
 */
//* 构造函数的重载
#include<iostream>
using namespace std;
class Box
{
    public:
        Box();
        Box(int h,int w,int len):height(h),width(w),length(len){};
        int volume();
    private:
        int height;
        int width;
        int length;
};
Box::Box()
{
    height=0;
    width=0;
    length=0;
}
int Box::volume()
{
    return (height*width*length);
}
int main()
{
    Box box1;
    cout<<"The volume of box1 is "<<box1.volume()<<endl;
    Box box2(15,30,25);
    cout<<"The volume of box2 is "<<box2.volume()<<endl;
    system("pause");
}